/*
 * @(#)MaintMultipleFileUploadForm.java
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */
package com.dcivision.upload.web;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionMapping;
import org.apache.struts.upload.FormFile;

import com.dcivision.framework.ApplicationException;
import com.dcivision.framework.GlobalConstant;
import com.dcivision.framework.SystemParameterConstant;
import com.dcivision.framework.SystemParameterFactory;
import com.dcivision.framework.bean.AbstractBaseObject;
import com.dcivision.framework.web.AbstractActionForm;

/**
  MaintMultipleFileUploadForm.java

  This class is the for web form purpose.

  @author      Angus Shiu
  @company     DCIVision Limited
  @creation date   22/12/2003
  @version     $Revision: 1.5.26.1 $
*/

public class MaintMultipleFileUploadForm extends AbstractActionForm {

  public static final String REVISION = "$Revision: 1.5.26.1 $";

  private FormFile uploadFile1 = null;
  private FormFile uploadFile2 = null;
  private FormFile uploadFile3 = null;
  private FormFile uploadFile4 = null;
  private FormFile uploadFile5 = null;
  private FormFile uploadFile6 = null;
  private FormFile uploadFile7 = null;
  private FormFile uploadFile8 = null;
  private FormFile uploadFile9 = null;
  private FormFile uploadFile10 = null;
  private String trueFileName1 = null;
  private String trueFileName2 = null;
  private String trueFileName3 = null;
  private String trueFileName4 = null;
  private String trueFileName5 = null;
  private String trueFileName6 = null;
  private String trueFileName7 = null;
  private String trueFileName8 = null;
  private String trueFileName9 = null;
  private String trueFileName10 = null;
  private String formName = null;
  private String idField = null;
  private String fileNames = null;
  private List uploadedFileList = new ArrayList();
  private List fileNameList = new ArrayList();
  private String displayFileNames = null;
  private String fileNameSeqNo = null;
  
  public MaintMultipleFileUploadForm() {
    super();
  }

  private final int displayListSize = SystemParameterFactory.getSystemParameterInteger(SystemParameterConstant.WORKFLOW_ATTACHMENT_UPLOAD_LIMIT).intValue(); // indicate how many files should be allowed to upload at once
  
  public FormFile getUploadFile1() {
    return (this.uploadFile1);
  }
  
  public void setUploadFile1(FormFile uploadFile1) {
    this.uploadFile1 = uploadFile1;
  }
  
  public FormFile getUploadFile2() {
    return (this.uploadFile2);
  }
  
  public void setUploadFile2(FormFile uploadFile2) {
    this.uploadFile2 = uploadFile2;
  }
  
  public FormFile getUploadFile3() {
    return (this.uploadFile3);
  }
  
  public void setUploadFile3(FormFile uploadFile3) {
    this.uploadFile3 = uploadFile3;
  }
  
  public FormFile getUploadFile4() {
    return (this.uploadFile4);
  }
  
  public void setUploadFile4(FormFile uploadFile4) {
    this.uploadFile4 = uploadFile4;
  }
  
  public FormFile getUploadFile5() {
    return (this.uploadFile5);
  }
  
  public void setUploadFile5(FormFile uploadFile5) {
    this.uploadFile5 = uploadFile5;
  }
  
  public FormFile getUploadFile6() {
    return (this.uploadFile6);
  }
  
  public void setUploadFile6(FormFile uploadFile6) {
    this.uploadFile6 = uploadFile6;
  }
  
  public FormFile getUploadFile7() {
    return (this.uploadFile7);
  }
  
  public void setUploadFile7(FormFile uploadFile7) {
    this.uploadFile7 = uploadFile7;
  }
  
  public FormFile getUploadFile8() {
    return (this.uploadFile8);
  }
  
  public void setUploadFile8(FormFile uploadFile8) {
    this.uploadFile8 = uploadFile8;
  }
  
  public FormFile getUploadFile9() {
    return (this.uploadFile9);
  }
  
  public void setUploadFile9(FormFile uploadFile9) {
    this.uploadFile9 = uploadFile9;
  }
  
  public FormFile getUploadFile10() {
    return (this.uploadFile10);
  }
  
  public void setUploadFile10(FormFile uploadFile10) {
    this.uploadFile10 = uploadFile10;
  }
  
  public String getTrueFileName1() {
    return (this.trueFileName1);
  }
  
  public void setTrueFileName1(String trueFileName1) {
    this.trueFileName1 = trueFileName1;
  }
  
  public String getTrueFileName2() {
    return (this.trueFileName2);
  }
  
  public void setTrueFileName2(String trueFileName2) {
    this.trueFileName2 = trueFileName2;
  }
  
  public String getTrueFileName3() {
    return (this.trueFileName3);
  }
  
  public void setTrueFileName3(String trueFileName3) {
    this.trueFileName3 = trueFileName3;
  }
  
  public String getTrueFileName4() {
    return (this.trueFileName4);
  }
  
  public void setTrueFileName4(String trueFileName4) {
    this.trueFileName4 = trueFileName4;
  }
  
  public String getTrueFileName5() {
    return (this.trueFileName5);
  }
  
  public void setTrueFileName5(String trueFileName5) {
    this.trueFileName5 = trueFileName5;
  }
  
  public String getTrueFileName6() {
    return (this.trueFileName6);
  }
  
  public void setTrueFileName6(String trueFileName6) {
    this.trueFileName6 = trueFileName6;
  }
  
  public String getTrueFileName7() {
    return (this.trueFileName7);
  }
  
  public void setTrueFileName7(String trueFileName7) {
    this.trueFileName7 = trueFileName7;
  }
  
  public String getTrueFileName8() {
    return (this.trueFileName8);
  }
  
  public void setTrueFileName8(String trueFileName8) {
    this.trueFileName8 = trueFileName8;
  }
  
  public String getTrueFileName9() {
    return (this.trueFileName9);
  }
  
  public void setTrueFileName9(String trueFileName9) {
    this.trueFileName9 = trueFileName9;
  }
  
  public String getTrueFileName10() {
    return (this.trueFileName10);
  }
  
  public void setTrueFileName10(String trueFileName10) {
    this.trueFileName10 = trueFileName10;
  }
  
  public String getFormName() {
    return (this.formName);
  }
  
  public void setFormName(String formName) {
    this.formName = formName;
  }
  
  public String getIdField() {
    return (this.idField);
  }
  
  public void setIdField(String idField) {
    this.idField = idField;
  }
  
  public String getFileNames() {
    return (this.fileNames);
  }
  
  public void setFileNames(String fileNames) {
    this.fileNames = fileNames;
  }
  
  public List getUploadedFileList() {
    return (this.uploadedFileList);
  }
  
  public void setUploadedFileList(List uploadedFileList) {
    this.uploadedFileList = uploadedFileList;
  }
  
  public List getFileNameList() {
    return (this.fileNameList);
  }
  
  public void setFileNameList(List fileNameList) {
    this.fileNameList = fileNameList;
  }
  
  public int getDisplayListSize() {
    return (this.displayListSize);
  }
  
  public void reset(ActionMapping mapping, HttpServletRequest request) {
    super.reset(mapping, request);
    this.setUploadFile1(null);
    this.setUploadFile2(null);
    this.setUploadFile3(null);
    this.setUploadFile4(null);
    this.setUploadFile5(null);
    this.setUploadFile6(null);
    this.setUploadFile7(null);
    this.setUploadFile8(null);
    this.setUploadFile9(null);
    this.setUploadFile10(null);
    this.setTrueFileName1(null);
    this.setTrueFileName2(null);
    this.setTrueFileName3(null);
    this.setTrueFileName4(null);
    this.setTrueFileName5(null);
    this.setTrueFileName6(null);
    this.setTrueFileName7(null);
    this.setTrueFileName8(null);
    this.setTrueFileName9(null);
    this.setTrueFileName10(null);
  }
  
  public AbstractBaseObject getFormData() throws ApplicationException {
    return null;
  }
  
  public void setFormData(AbstractBaseObject baseObj) throws ApplicationException {
  }
    
  public String getDisplayFileNames() {
  	return displayFileNames;
  }
  
  public void setDisplayFileNames(String displayFileNames) {
  	this.displayFileNames = displayFileNames;
  }
  
  public String getFileNameSeqNo() {
  	return fileNameSeqNo;
  }
  
  public void setFileNameSeqNo(String fileNameSeqNo) {
  	this.fileNameSeqNo = fileNameSeqNo;
  }
  
  public boolean isViewMode(){
    return GlobalConstant.NAV_MODE_VIEW.equals(getNavMode());
  }
}
